<template>
  <span>count: {{ count }}</span>
  <span>count: {{ string }}</span>
  <button @click="count++">增加</button>
  <button @click="string = string + 1">改变string</button>
</template>

<script>
import { ref, watch } from "vue";
export default {
  setup() {
    const count = ref(0);
    const string = ref("abin");
    watch([count, string], ([count, string], [precount, prestring]) => {
      console.log(
        "[count, string], [precount, prestring]",
        [count, string],
        [precount, prestring]
      );
    });
    return {
      count,
      string,
    };
  },
};
</script>

<style>
</style>